<template>
    <!-- pages/announcement/index.wxml -->
    <view class="anmtbox" :style="'padding-bottom:' + marginBottom + 'rpx;'">
        <view class="felxbox" @tap="toAnnouncementdetails">
            <view class="box">
                <view class="text1">【意约APP新版上线公告】</view>
                <view class="text2">首脑丝情美发沙龙特惠会员优惠活动，新会员首单立减15元，老会员积分可兑现。</view>
            </view>
            <view class="time">3月22日</view>
        </view>
    </view>
    <!-- <tabbar activeIdx="0"></tabbar> -->
</template>

<script>
// pages/announcement/index.js
const app = getApp(); // 引入app

const _request = require('../../utils/request.js'); // 引入require;

export default {
    data() {
        return {
            marginBottom: app.globalData.marginBottom,
            imgUrl: app.globalData.imgUrl //全局img路径
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {},
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        toAnnouncementdetails() {
            uni.navigateTo({
                url: '/pages/announcementdetails/index'
            });
        }
    }
};
</script>
<style>
/* pages/announcement/index.wxss */
page {
    background: #fbfbfb;
    position: relative;
}

.anmtbox {
    overflow-y: auto;
}

.felxbox {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    /* border-bottom: 1px solid #DADADA; */
    align-items: center;
    margin: 20rpx 20rpx 0 20rpx;
    width: 710rpx;
    height: 204rpx;
    background: #ffffff;
    box-shadow: 1px 1px 4px 1px rgba(241, 241, 241, 0.4);
    border-radius: 2px;
    padding: 30rpx 20rpx;
    box-sizing: border-box;
}
.box {
    height: 100%;
}
.text1 {
    height: 44rpx;
    font-size: 32rpx;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
    line-height: 44rpx;
}

.text2 {
    height: 40rpx;
    font-size: 28rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #666666;
    line-height: 40rpx;
    margin-top: 20rpx;
}

.apptext {
    width: 100%;
}

.header {
    width: 120rpx;
    height: 120rpx;
    border-radius: 50%;
}

.time {
    height: 34rpx;
    font-size: 24rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #999999;
    line-height: 34rpx;
    position: absolute;
    top: 56rpx;
    right: 60rpx;
}
</style>
